<!DOCTYPE html>

<script>
  window.addEventListener('beforeunload', function (e) {
    e.preventDefault();
    e.returnValue = 'Dialog';
    return;
  })
</script>
